const express = require('express')
const router = express.Router()
const Dispatch = require('../modules/dispatch/Dispatch')
/* GET users listing. */
router.get('/', function(req, res, next) {
  let data = {name:"adv30",login_password:"12345678",token:"b49baca86cf59b174feae087a63d8656"}
  new Dispatch().post('serveruser/user/User/login', data)
  .then(response => {
    if (response.status === 200) {
      res.send(response.data)
    } else {
      res.send(response.data)
    }
  })
  .catch(error => {
    res.send(error.response.data)
  })
})

module.exports = router
